# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=py3-zope-testrunner
_pkgname=zope.testrunner
pkgver=6.4
pkgrel=1
pkgdesc="Zope testrunner script"
options="!check" # Fails to run
url="https://github.com/zopefoundation/zope.testrunner"
arch="noarch"
license="ZPL-2.1"
depends="python3 py3-setuptools py3-zope-exceptions py3-zope-interface"
makedepends="py3-gpep517 py3-wheel"
checkdepends="py3-zope-testing"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare

	#Remove ancient python2.5 reference
	rm -rf $builddir/src/zope/testrunner/tests/testrunner-ex-251759
}

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
ed31a79d2f6dad0226a016b24c7d862cc261c61aaacfb6aaef88096b094f0fc957a5c1226a2fe72afed9c7af3cff51c488a3523be0b314b29babb4e13869202e  zope.testrunner-6.4.tar.gz
"
